cmake_minimum_required(VERSION 3.0.2)
project(object_detect)

#SET(OpenCV_DIR /usr/local/lib/cmake/opencv4)
SET(CMAKE_BUILD_TYPE "Debug")  
find_package(catkin REQUIRED COMPONENTS
  roscpp
  rospy
  std_msgs
  image_transport
  cv_bridge
)

find_package(OpenCV 4.0 REQUIRED)
find_package(ngraph REQUIRED)
find_package(InferenceEngine REQUIRED monitors)

catkin_package()

add_subdirectory(RosDetect)
include_directories(include ${catkin_INCLUDE_DIRS} /opt/intel/openvino_2020.4.287/deployment_tools/inference_engine/samples/cpp/common/)

add_executable(object_detect src/object_detect.cpp)
target_link_libraries(object_detect ${catkin_LIBRARIES} ${OpenCV_LIBS} ${InferenceEngine_LIBRARIES} ${NGRAPH_LIBRARIES} RosDetect)

add_executable(demo src/demo.cpp)
target_link_libraries(demo ${catkin_LIBRARIES} ${OpenCV_LIBS} ${InferenceEngine_LIBRARIES} ${NGRAPH_LIBRARIES} RosDetect)


add_executable(subscirber src/subscirber.cpp)
target_link_libraries(subscirber ${catkin_LIBRARIES} ${OpenCV_LIBS}  ${InferenceEngine_LIBRARIES} ${NGRAPH_LIBRARIES} RosDetect)

add_executable(pub src/pub.cpp)
target_link_libraries(pub ${catkin_LIBRARIES} ${OpenCV_LIBS} ${InferenceEngine_LIBRARIES} ${NGRAPH_LIBRARIES} RosDetect)